package com.mde.mapspathfinder.activ;

import org.osmdroid.util.GeoPoint;
import org.osmdroid.views.MapController;
import org.osmdroid.views.MapView;

import android.app.Activity;
import android.os.Bundle;

import com.mde.yandexmaptrial.R;

public class OpenMapActivity extends Activity {
	
	private MapView mapView;
	private MapController mapController;
	
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.open_layout);
		
		initMap();
	}

	private void initMap() {
		mapView = (MapView) this.findViewById(R.id.mapOpen);
		mapView.setBuiltInZoomControls(true);
		mapView.setMultiTouchControls(true);
		mapController = (MapController) mapView.getController();
		mapController.setZoom(18);
		
		GeoPoint geoPoint = new GeoPoint(52.089159,23.698327);
		mapController.animateTo(geoPoint);
	}

	@Override
	public void finish() {
	    mapView = null;
	    mapController = null;
	    super.finish();
	}

}
